import React, { useEffect, useState } from 'react'
import axios from 'axios'
import { Table } from 'antd'
import columns from '../../configure/Clouts'
export default function TableData() {
  const [data,setdata] =useState([])
useEffect(()=>{
const timer =setInterval(()=>{

  const victyname = window.localStorage.getItem('victyname')
axios.get(`http://node.dayuan0307.top:300/victy/query/${victyname}`).then(res=>{
  console.log(res)
  setdata(res.data)
})
},15000)
return (()=>{
  clearInterval(timer)
  console.log("cleanup")
  //清理任务
})

})

  return (
    <div>
      <Table  columns={columns} dataSource={data}></Table>
    </div>
  )
}
